/**
 * Created by yaohuan on 2018/5/2 0002.
 */
define(["public/app.min"],function () {
    var self;

    function Xdxd() {
        self = this;
        self.items = [
            {
                name: '燃气',
                code: 'rq',
                icon: 'icon-003'
            }, {
                name: '燃油',
                code: 'ry',
                icon: 'icon-002'
            },{
                name: '燃电',
                code: 'rd',
                icon: 'icon-001'
            }
        ];
        self.init();
    }

    Xdxd.prototype.init = function () {

        mui.ready(function () {
            new Vue({
                el: app.getByid(doc,'content'),
                data: {
                    items: self.items
                },
                methods: {
                    openWindow: function (name) {
                        if (name == 'rq') {
                            app.openPage({
                                src: "http://www.baidu.com",
                                /*argsKey: 'response_page', // 设置页面请求参数key值
                                 args: { // 请求参数,app.pageParameters['response_page']获取args对象
                                 type: 2
                                 }*/
                            });
                        } else if (name == 'ry') {
                            app.openPage({
                                src: "http://www.baidu.com",
                            });
                        } else if (name == 'fl') {
                            app.openPage({
                                src: "classes.html",
                            });
                        } else if (name == 'zc') {
                            app.openPage({
                                src: "http://www.github.com",
                            });
                        } else if (name == 'wo') {
                            app.openPage({
                                src: "http://www.github.com",
                            });
                        }
                    }
                }
            });
        })

    }
    return new Xdxd();
})